home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 2 / Meeting Pearls Vol. II (1995)(GTI - Schatztruhe)[!].iso / Pearls / dev / Oberon4Amiga / system / Elem.Guide.Text (.txt) < prev    next >
Oberon Text  |  1994-06-23  |  23KB  |  248 lines

  1. Syntax12.Scn.Fnt
  2. ParcElems
  3. Alloc
  4. Syntax14m.Scn.Fnt
  5. Syntax10.Scn.Fnt
  6. Syntax12m.Scn.Fnt
  7. Syntax12i.Scn.Fnt
  8. LineElems
  9. Alloc
  10. Syntax12b.Scn.Fnt
  11. TableElems
  12. Alloc
  13. Syntax10.Scn.Fnt
  14. Syntax10i.Scn.Fnt
  15. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  16. /columns  string
  17. Syntax10.Scn.Fnt
  18. ParcElems
  19. Alloc
  20. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  21. control column formatting
  22. string = {L|C|R|N|-}.
  23. Syntax10.Scn.Fnt
  24. ParcElems
  25. Alloc
  26. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  27. L    left flush
  28. C    centered
  29. R    right flush
  30. N    numeric (period adjusted)
  31. -    default
  32. Syntax10.Scn.Fnt
  33. Syntax10i.Scn.Fnt
  34. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  35. /rows  string
  36. Syntax10.Scn.Fnt
  37. ParcElems
  38. Alloc
  39. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  40. control row formatting
  41. string = {B|L|C|T|-}.
  42. Syntax10.Scn.Fnt
  43. ParcElems
  44. Alloc
  45. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  46. B    bottom flush
  47. L    common baseline
  48. C    centered
  49. T    top flush
  50. -    default
  51. Syntax10.Scn.Fnt
  52. Syntax10i.Scn.Fnt
  53. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  54. /noheads  string
  55. Syntax10.Scn.Fnt
  56. ParcElems
  57. Alloc
  58. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  59. turn header lines off
  60. string = {H|V |*}.
  61. Syntax10.Scn.Fnt
  62. ParcElems
  63. Alloc
  64. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  65. H    horizontal
  66. V    vertical
  67. *    all
  68. Syntax10.Scn.Fnt
  69. Syntax10i.Scn.Fnt
  70. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  71. /nolines  string
  72. Syntax10.Scn.Fnt
  73. ParcElems
  74. Alloc
  75. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  76. turn separation lines off
  77. string = {L|R|B|T|H|V|*}.
  78. Syntax10.Scn.Fnt
  79. ParcElems
  80. Alloc
  81. /left 0/right 0/nohead "*"/noline "*"/col "LL"/table
  82. L    left frame
  83. R    right frame
  84. B    bottom frame
  85. T    top frame
  86. H    horizontal separation
  87. V    vertical separation
  88. *    all
  89. Syntax10.Scn.Fnt
  90. ParcElems
  91. Alloc
  92. Syntax10i.Scn.Fnt
  93. /left 0/right 0/nohead "*"/noline "*"/table
  94. /period  string
  95. /left  integer
  96. /right  integer
  97. /bottom  integer
  98. /top  integer
  99. /grid  integer
  100. Syntax10.Scn.Fnt
  101. ParcElems
  102. Alloc
  103. /left 0/right 0/nohead "*"/noline "*"/table
  104. first char redefines period (e.g. ",")
  105. left cell margin
  106. right cell margin
  107. bottom cell margin
  108. top cell margin
  109. cell width grid *)
  110. Documentation of Text Elements
  111. Last Update: 1 Oct 93    (M. Hausner, Ed.)
  112. Table of Contents
  113. Element Class    Author    Last Update
  114. Clock    R. Griesemer    28 Sept 93
  115. Error    C. Szyperski    28 Sept 93
  116. Fold    H. M
  117. ssenb
  118. ck    28 Sept 93
  119. Graphic    C. Szyperski    27 Sept 93
  120. Icon    R. Griesemer    1 Oct 93
  121. Line    C. Szyperski    28 Sept 93
  122. Menu    N. Wirth    16 Sept 93
  123. Picture    H. Marais, K. Rege    7 Feb 91
  124. Popup - "Hypertext without Surprises"    M. Franz, S. Ludwig    30 Sept 93
  125. Stamp    C. Szyperski    28 Sept 93
  126. Style    C. Szyperski    28 Sept 93
  127. Table    C. Szyperski    28 Sept 93
  128. This documentation is a periodically updated collection of sections describing fully independent text elements. Each section is divided into two subsections: A textual introduction to the functionality of the particular elements, followed by a list of supported commands. For each command, the command name, its explicit and its implicit parameters are given. Potential implicit parameters are the caret, selections, and the marked viewer. Explicit parameters are described using a compact syntax explained in the tutorial Edit.Guide.Text. At the end of each section a list of required files is given.
  129. E-mail update requests to the editor. Implementations of useful new text elements are always welcome.
  130. Get newest version:
  131.     Net.ReceiveFiles Pluto  Elems:Elem.Guide.Text ~
  132. Companion documentation:
  133.     Edit.Guide.Text - Tutorial and Release Notes
  134. Clock Elements
  135. Analog clocks elements displaying the current time (whenever the machine is idle).
  136. command    explicit parameters    implicit parameters
  137. ClockElems.Insert 9    [number]    caret
  138. Insert a clock (with radius given in mm; default is 8) at the caret position.
  139. load: Net.ReceiveFiles Pluto  Elems:ClockElems.obj ~
  140. Error Elements
  141. Error elements can be used to translate error lists produced by a compiler into special marking elements within the source text. Since elements move when editing text, it becomes possible to edit a large number of errors at a time. Error elements are temporary elements and hence vanish automatically when storing a text.
  142. By clicking on an error element using MM, the element may be toggled between its (initial) compact form and its full form. In the compact form, it displays the error number. In the full form, the element displays the corresponding error message. In order for this function to work properly, the file OberonErrors.Text is required. (This file contains the error code/error message pairs.)
  143. command    explicit parameters    implicit parameters
  144. ErrorElems.Mark    ("^" | error-list)    marked viewer
  145. Takes the list of errors produced by a compiler (position, error code pairs) and inserts error marks into the marked text. If error marks were already present in that text, they are removed beforehand.
  146. ErrorElems.Unmark        marked viewer
  147. Remove all error elements from the marked text.
  148. ErrorElems.LocateNext        marked viewer, caret (in marked viewer)
  149. Locate the next error element starting the search at the caret position. If no caret is set in the marked viewer, the first error element is located.
  150. load: Net.ReceiveFiles Pluto  Elems:ErrorElems.obj OberonErrors.Text Syntax8.Scn.Fnt ~
  151. Fold Elements
  152. Fold Elements can be used to partially and hierarchically fold texts. Folding a text stretch causes its replacement by another, usually shorter or empty text stretch. Unfolding a folded stretch reveils the original text stretch while hiding its replacement. A (partially) folded text may be compiled as if it where fully unfolded using a utility module Folds. Folds also includes the functionality of ErrorElems, as defined elsewhere in this documentation. Options such as the compiler or error message file to be used can be specified in a file Folds.Profile. A demonstration of FoldElems and Folds is available as file FoldDemo.Text.
  153. command    explicit parameters    implicit parameters
  154. FoldElems.Insert        selection
  155. Make selection foldable by inserting an appropriate pair of opening and closing fold elements before and after the selected text stretch, respectively.
  156. FoldElems.Expand        marked viewer
  157. Unfolds (expands) all folds contained in the marked text.
  158. FoldElems.Collapse        marked viewer
  159. Folds (collapses) all folds contained in the marked text.
  160. FoldElems.Marks     ("^" | "on" | "off")    marked viewer
  161. Make all fold elements in the marked text visible or invisible.
  162. FoldElems.Search        selection, marked viewer    
  163. Searches for the selected pattern in the text of the focus viewer starting at the caret position. Searches also within folded parts and opens folds if necessary to display found text stretches. If no selection is present, the last search pattern is used again. If no caret is present, the search starts at the beginning of the text.
  164. Folds.Compile    ("^" | "*" [compiler-options] | name [compiler-options])
  165. Compiles the specified text (possibly containing folds). The compiler is started on the fully expanded view of the text.
  166. Folds.ShowError    ("*")    marked viewer
  167. Places the caret at the next error after the caret position and display an error message in the Log viewer. If no caret is present, the first error in the marked text is displayed.
  168. Folds.SetProfile
  169. Sets the options specified in the file Folds.Profile (which compiler and which error message file should be used; should warnings be displayed). SetProfile is done automatically at the beginning. If Folds.Profile is missing, default options are: Compiler.Compile, OberonErrors.Text, warnings displayed.
  170. load: Net.ReceiveFiles Pluto    Elems:FoldElems.obj Elems:FoldElems.Tool hm:FoldDemo.Text ~
  171.        Net.ReceiveFiles Pluto    hm:Folds.obj hm:Folds.Tool ~
  172. Graphics Elements
  173. Graphic elements support incorporation of graphs compatible with the standard Draw package into texts. A single command is provided by module GraphicElems in order to insert a new graphics. Using the middle mouse button, a graphics element can be "opened" for editing. As a result, a graphics viewer is opened displaying the graph. The command GraphicElems.Update in the viewer's menu can be used to propagate changes made to the graph back to the graphics element. Graphic elements support inplace editing: focus the element using the left mouse key and use standard Draw editing techniques within the activated graphics frame.
  174. command    explicit parameters    implicit parameters
  175. GraphicElems.Insert    ("^" | "*" | name)    caret (plus marked viewer, if "*" is used)
  176. Inserts a graphics element sized to show the graph stored in graphics file "name". If an open graphics viewer is marked, the command can be used to insert all or part of a displayed graph: if a selection exists in the marked graphics viewer's graph, only the selection is copied into the graphics element.
  177. load: Net.ReceiveFiles Pluto  Elems:GraphicElems.obj ~
  178. Icon Elements
  179. Display a small "walking sysiphus" icon. By clicking on such an icon using MM, a screen saver is started. Using an icon editor, the file IconElems.Icon may be changed or replaced to install a different animated icon.
  180. command    explicit parameters    implicit parameters
  181. IconElems.Insert        caret
  182. Inserts a new Icon Element at the caret position.
  183. load: Net.ReceiveFiles Pluto  Elems:IconElems.obj Elems:IconElems.Icon ~
  184. Line Elements
  185. Line elements support horicontal or vertical lines within a text. A single command is provided to insert new line elements. The insertion command takes certain parameters such that line elements can be set to automatically adapt in width and height.
  186. command    explicit parameters    implicit parameters
  187. LineElems.Insert    ("^" | ( ("auto" | "tab" | W) ("auto" | H) ) )    caret
  188. Inserts a line of given or automatically adopted width and height into a text. Width and height may be set in units of 1/10 mm. Otherwise, the width may be set to extend to the end of the current line ("auto") or to the next tabulator position ("tab"). The height may be set to equal the paragraphs line height (determined by the parc's line attribute).
  189. load: Net.ReceiveFiles Pluto  Elems:LineElems.obj ~
  190. Picture Elements
  191. Picture elements support incorporation of pictures compatible with the standard Paint package into texts. Using the middle mouse button, a picture element can be "opened" for editing. As a result, a picture viewer is opened displaying the picture. The command PictureElems.Update in the viewer's menu can be used to propagate changes made to the picture back to the picture element.
  192. command    explicit parameters    implicit parameters
  193. PictElems.Insert    ("^" | "*" | name ["scaled"])    caret
  194. Inserts a picture element sized to show the picture stored in picture file "name". If "*" is used, the marked picture is inserted.
  195. load: Net.ReceiveFiles Pluto  Elems:PictElems.obj ~
  196. Popup Elements - "Hypertext without Surprises"
  197. Popup elements introduce hypertext features into texts. They have commands associated with them which are executed when the elements are clicked. A popup element that executes a single command is also called a "button". Popup Elements are a generalization of the "button" concept found in many hypertext systems in that they present a user with a menu of choices instead of representing only a single command.
  198. A popup element is displayed as a rectangular "button" shape floating in the text. Clicking MM while the mouse points to a button causes the menu of commands associated with the button to appear on the screen. The command that was last chosen from this menu is highlighted and offered as a default. A new command may then be chosen from the menu by moving the mouse over it. The new command becomes highlighted and is executed when the user releases the middle mouse button. At any time, the popup action may be cancelled by releasing MM while the mouse is outside of the menu box or by a click of the left mouse button.
  199. Interclicking MR while a menu is displayed opens a menu-edit viewer. The menu may be edited freely in this viewer. Any changes are propagated instantly to the menu in question. Popup elements may be copied freely among texts. Their complete state, including the last command chosen (the next default) are saved to and restored from disk when the associated document is written or opened.
  200. When a menu command is called, Oberon.Par.text is set to the text of the menu. It is therefore possible to pass parameters to menu commands simply by including them in the menu text. Oberon.Par.vwr is set to the Viewer displaying the text and Oberon.Par.frame to the corresponding frame.
  201. command    explicit parameters    implicit parameters
  202. PopupElems.Insert    string    caret
  203. Inserts a new popup element with an initially empty menu. The menu associated with the element may be edited in a menu-edit viewer which is opened by clicking MM on the element with MR interclick. The width of the menu is automatically adjusted to accomodate the widest command, while its line spacing is adjusted automatically to accomodate the largest font in the menu.
  204. load: Net.ReceiveFiles Pluto  Elems:PopupElems.obj ~
  205. Menu Elements
  206. Menu elements are a variant of popup elements. They appear as a simple piece of text (their name) on the screen. If clicked at with MM, a command menu pops up. A Middle-Left-Click at the element causes the menu text to be displayed for editing in a separate viewer. The first line of the menu text is interpreted as the menu name.
  207. command    explicit parameters    implicit parameters
  208. MenuElems.Insert        caret position
  209. Inserts a menu element at the caret position. Initially the element is displayed as a blank rectangle. A Middle-Left-Click displays the (empty) menu text for editing.
  210. MenuElems.Update        text in command viewer
  211. This command is usually contained in the menu of the viewer that displays the text of a menu element for editing. It installs the text in the viewer as the new menu text of the element.
  212. load: Net.ReceiveFiles Pluto    Elems:MenuElems.obj ~
  213. Stamp Elements
  214. Display date of most recent store of the text containing the element. (After insertion, StampElems display the current date.) The insert command takes an optional font name which is used to preset the font of the inserted element.
  215. command    explicit parameters    implicit parameters
  216. StampElems.Insert    [name]    caret
  217. Inserts a new stamp element, where the name indicated the font to be used. (If name is omitted, the default font is used.)
  218. Style Elements
  219. Style Elements extend standard Parcs by adding a name and automatic conformance of equally named parcs within a text. For example, a parc named "heading" may be set to format a section heading. Then, all parcs with that name use and maintain the same format as changes are propagated automatically.
  220. When copying a style parc from one text to another the behaviour of the copied parc depends on the target text. If it already contains a style with that name, the copied parc will adopt itself to that style. Otherwise, the copied parc defines a new style. Likewise, a style parc may be renamed. If it is renamed to a style that already exists in the containing text, the parc will adopt to that style, while otherwise it introduces a new style.
  221. Some examples for style parcs follow below. Note that the Syntax8.Scn.Fnt file should be available to get nicely labled style parcs.
  222. command    explicit parameters    implicit parameters
  223. StyleElems.Insert    ("^" | name | string)    caret
  224. Insert a new style parc with the given name at the caret position. A quoted string may be used to assign names consisting of multiple words.
  225. StyleElems.Rename    ("^" | name | string)    selected parc
  226. Renames the selected parc to the given name.
  227. load: Net.ReceiveFiles Pluto  Elems:StyleElems.obj Syntax8.Scn.Fnt ~
  228. Table Elements
  229. Table Elements are automatically formatted tables created from raw, unformatted data. A plain text separated by tabulator characters into columns and by carriage returns into rows can be used to define the table. Furthermore, a certain set of options may be used to modify the default formatting of the table.
  230. Clicking on a table element using MM opens an viewer such that the table contents can be edited. Tables may contain arbitrary text elements, including tables. However, elements incorporated into a table are frozen as is, i.e. messages broadcasted to all visible elements in a text frame are not passed to elements nested into a table. Hence, only static elements should be inserted into tables.
  231. Starting from a defining text containing arbitrary strings separated by tabulator and carriage-return characters, a table is constructed. Tabulators separate columns, carriage-returns separate rows. The separated strings form the contents of table cells. Each such string may in turn contain arbitrary text elements and especially it may contain nested tables. The defining text is bound to a table element and can be edited by clicking on a table with the middle mouse button. In return, a standard text viewer is opened containing an update command in its menu bar. The syntax of the defining text is as follows, table options will be defined later.
  232.     table = {option} "/table" {line}.
  233.     line = cell {TAB cell} CR.
  234.     cell = ["#" | "&"] <string of characters not containing TAB or CR>.
  235. A string starting with a digit, a period (.), or a sign (+ or -) is considered numeric, otherwise it is considered nonnumeric. A number sign (#) prefixing a string is suppressed and enforces numerical interpretation; likewise, an ampersand (&) prefixing a string is suppressed and enforces nonnumerical interpretation. The default table formatting causes all cells in the first column to be formatted left flush. In all other columns, the default format for numeric cells is period-aligned and that for nonnumeric cells is centered. All cells in a row are by default aligned to a common base line. Also, the default format causes the table to be framed and separating lines between rows and columns to be drawn. Finally, for a table with more than two rows or two columns the first row or column separatation line is drawn using two parallel lines, respectively. Most of the default formats can be changed using the provided option set.
  236. For table elements the printing dilemma discussed in section 1.5 needs to be reconsidered. Following the strategy developed for texts, a table would be recasted when printing. However, one of the primary attributes of a table are its measures, i.e. the space taken for individual cells of the table and the arrangement of the cells with respect to each other. It is not acceptable that a table gets completely redimensioned when printed. Hence, for table elements a different printing strategy has been choosen: the displayed table on the screen follows - down to the character level - the metrics of the printer fonts. The resulting screen image looks a bit distorted, however, the displayed measures correspond as closely as possible to the printed ones.
  237. The following table gives an overview over available table formatting options.
  238. option    effect (measures in 1/10 mm)    argument values
  239. *)  A parc at the beginning of the table defining text introduces a minimal
  240.      cell height as well as a cell height grid (if the grid option of the parc is set)
  241. Overview of TableElems Options
  242. command    explicit parameters    implicit parameters
  243. TableElems.Insert    ["^" | name]    caret
  244. Insert a table defined by the given text at the caret position. If no defining file is given, or the table definition is syntactically erroneous, an empty table is inserted.
  245. TableElems.Update    (to be called from menu frame)
  246. Take the viewer's content frame's text as defining text and update the associated table element.
  247. load: Net.ReceiveFiles Pluto  Elems:TableElems.obj ~
  248.